﻿using System;
using System.Collections.Generic;
using ArchitectureExample.Domain.Users;
using Patterns4Net.Attributes.DesignPatterns;

namespace ArchitectureExample.DataAccess
{
    /// <summary>
    /// Adds caching to a IUserRepository object.
    /// </summary>
    [Decorator(Decorated = typeof(IUserRepository))]
    public class CachingRepositoryDecorator : IUserRepository
    {
        private IUserRepository decorated;

        public CachingRepositoryDecorator(IUserRepository decorated)
        {
            this.decorated = decorated;
        }

        public IEnumerable<User> Execute(Query query)
        {
            return null;
        }

        public void Save(User user)
        {            
        }
    }
}
